﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Workflow.Runtime.Tracking;
using System.Workflow.ComponentModel;

namespace OpenComposite.Repository.Tracking
{
	internal class TrackedActivityInstance
	{
		#region Initialization

		public TrackedActivityInstance(ActivityTrackingRecord instance)
		{
			_instance = instance;
		}

		#endregion Initialization

		#region Public Members

		#region Properties

		public ActivityTrackingRecord Instance
		{
			get { return _instance; }
		}

		public string Name
		{
			get { return _instance.QualifiedName; }
		}

		public ActivityExecutionStatus Status
		{
			get { return _instance.ExecutionStatus; }
		}

		public DateTime Time
		{
			get { return _instance.EventDateTime; }
		}

		public string ToolTip
		{
			get
			{
				return string.Format("Occured at: {0}", Time);
			}
		}

		#endregion Properties

		#endregion Public Members

		#region Private Members

		#region Fields

		private ActivityTrackingRecord _instance = null;

		#endregion Fields

		#endregion Private Members
	}
}
